package com.xsm.ppsecret.ui;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;

import com.xsm.ppsecret.R;
import com.xsm.ppsecret.ui.ease.ChatListActivity;
import com.xsm.ppsecret.ui.log.LogActivity;
import com.xsm.ppsecret.ui.pwd.PwdActivity;

import butterknife.ButterKnife;
import butterknife.OnClick;


public class ShowActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show);
        ButterKnife.bind(this);
    }

    @Override
    public void onBackPressed() {
        //在activity中调用 moveTaskToBack (boolean nonRoot)方法即可将activity 退到后台，注意不是finish()退出
        //参数为false——代表只有当前activity是task根，指应用启动的第一个activity时，才有效;
        //参数为true——则忽略这个限制，任何activity都可以有效。
        moveTaskToBack(true);
    }

    @OnClick(R.id.fl_password_book) void inPasswordBook() {
        startActivity(new Intent(this, PwdActivity.class));
    }

    @OnClick(R.id.fl_secret_log) void inSecretLog() {
        startActivity(new Intent(this, LogActivity.class));
    }

    @OnClick(R.id.fl_chat) void inChat() {
        startActivity(new Intent(this, ChatListActivity.class));
    }

    @OnClick(R.id.fl_settings) void inSet() {
        startActivity(new Intent(this, SetActivity.class));
    }

}
